﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section Head{
<script type="text/javascript">
    $(function () {
        var mainheight = document.documentElement.clientHeight;
        var mainWidth = document.documentElement.clientWidth - 10;
        $("#StorageBegin").datepicker({ picker: "<img class='picker' align='middle' src='../../Images/icons/s.gif' alt=''/>" });
        $("#StorageEnd").datepicker({ picker: "<img class='picker' align='middle' src='../../Images/icons/s.gif' alt=''/>" });

        var otherpm = $("#title").height() + $("#findDiv").height(); // 290;
        var gh = mainheight - otherpm - 80;

        var options = {
            height: gh,
            width: mainWidth,
            url: '@Url.Action("GetDetailList")',
            colModel: [
                    { display: '编号', name: 'ID', width: 60, sortable: false, align: 'left', hide: true, iskey: true }
				],
            buttons: [
                            { name: 'Add', displayname: "新建", title: "新建", bclass: 'add', onpress: toolbarItemAdd_onclick },
                            { name: 'Edit', displayname: "修改", title: "编辑", bclass: 'edit', onpress: toolbarItemEdit_onclick },
                            { name: 'Delete', displayname: "删除", title: "删除", bclass: 'delete', onpress: toolbarItemDel_onclick },
                            { separator: true }
                         ],
            singleselected: false,
            sortname: "Sequence",
            sortorder: "asc",
            title: false,
            usepager: true,
            page: 1,
            rp: 20,
            rpOptions: [10, 15, 20],
            showcheckbox: true,
            selectedonclick: true, //点击行是否选中
            rowbinddata: true
        };
        var instockgrid = $("#storageList").flexigrid(options);
    });
</script>
    
  }

